# FROM python:3.8-slim-bullseye
FROM python:3.7-alpine3.12

ADD ./src /app
WORKDIR /app

EXPOSE 1124/tcp

# RUN apt-get install -y curl make gcc && \
# apt-get remove -y --auto-remove curl make gcc && apt-get clean && rm -rf /var/lib/apt/lists/* \
# find /usr/lib/python3.7 -name '*.pyc' -delete && \
# find /usr/local/lib/python3.7 -name '*.pyc' -delete && \
# python -m pip cache purge && rm -r ~/.cache/pip && \
# rm -rf /tmp/* /var/cache/apk/* /var/lib/apt/* /var/cache/* /var/log/*
RUN pip --no-cache-dir install -r requirements.txt && \
find /usr/local/lib/python3.7 -name '*.pyc' -delete && \
rm -rf /tmp/* /var/cache/apk/* /var/lib/apt/* /var/cache/* /var/log/*

#解决Dockers中打印日志不及时的问题
ENV PYTHONUNBUFFERED=0

# ENTRYPOINT python3
CMD ["python3", "kitymind.py"]
